Re: [INTERFACES] JDBC query... - Mailing list pgsql-interfaces

From Herouth Maoz
Subject Re: [INTERFACES] JDBC query...
Date
Msg-id l0313030db3dc897aad3f@[147.233.159.109]
Whole thread Raw
In response to JDBC query...  (Mark Dzmura <mdz@phalanx.phalanx.net>)
List pgsql-interfaces
At 02:18 +0300 on 13/08/1999, Mark Dzmura wrote:


>1. Is there an object of higher "scope" than the Connection object, which
>is bound to a specific database??

A connection object is bound to one connection to a single database. If you
want to create or delete databases, you have to connect to the PostgreSQL
database named 'template1'. You will typically have a separate connection
object for this.

>2. Is there a Database object, which provides methods to create, destroy,
>and modify the schemas of tables ?? Or can I do SQL "CREATE TABLE" and
>"DROP TABLE" operations using some version of Statement which doesn't
>return a ResultSet ??

Yes, you can use statements such as CREATE TABLE, DROP TABLE, and any other
DDL statement, by using the executeUpdate() method of Statement or
PreparedStatement. Its name may suggest that it is only for UPDATE
statements, but that's not true. It's for any query which is not expected
to return a result set.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma




pgsql-interfaces by date:

Previous
From: mmw@paradise.net.nz
Date:
Subject: Access ODBC worries - update
Next
From: "Dutt H Kalapatapu"
Date:
Subject: fe_setauthsvc, invalid name error.